import React, { Component } from 'react'
import style from "./nav.module.css"
export default class nav extends Component {
     state={
         idx:0
     }
    render() {
        return (
            <div className={style.mmm}>
                 <div className={style.head}>
                   {
                      this.props.a.map((item,i)=><span key={i} onClick={()=>{
                           this.state.idx=i;
                            this.setState({})}}
                       className={this.state.idx===i?style.active:style.aaa}
                       >{item}</span>)
                   }
                  
               </div>
            </div>
        )
    }
}
